<?php

	$jenis_simp = $laporan_data['jenis_simp'];
	$sandi = '';
	if($jenis_simp == 1){//tab
		if ($laporan_data['sandi_simp'] == '1') {
			$sandi = '1';
		}else if ($laporan_data['sandi_simp'] == '3') {
			$sandi = '7';
		}else if ($laporan_data['sandi_simp'] == '2') {
			$sandi = '9';
		}
	}else if($jenis_simp == 2){//pokok
		$sandi = '74';		
	}else if($jenis_simp == 3){//wajib
		$sandi = '82';		
	}
	
	$jumlah = $laporan_data['biaya'];
	//$saldo = $saldo_data['saldo_simp'];
	$saldo = $laporan_data['saldo_sblm'] + $laporan_data['biaya'];
	//$jumlah = '125240000';
	//$saldo = '220202500';
	if($jumlah < 0){
		$jumlah = $jumlah * -1;
	}
	//$jumlah = 222522122;
	$npwp = '22';
	$nama = 'yeah';
	$tgl = substr($laporan_data['tgl_reg'],8).'/'.substr($laporan_data['tgl_reg'],5,2).'-'.substr($laporan_data['tgl_reg'],2,2);
	
	/*
	$sekarang = date("j").' '.nama_bulan(date("m")).' '.date("Y");
	*/

$this->fpdf->SetMargins(1,1,1);
$this->fpdf->SetAutoPageBreak(true,1);
$this->fpdf->Open();
$this->fpdf->AliasNbPages();
$this->fpdf->AddPage();

$this->fpdf->Ln();
//$this->fpdf->Cell(0.05,0.7,"",'TLBR',0,'C',1);
//$this->fpdf->Cell(3.5,0.7,'NPWP','L',0,'L');
//$this->fpdf->Cell(0.5,0.7,':',0,0,'C');
//$this->fpdf->SetFont('Times','',12);

//$this->fpdf->Ln();
//$this->fpdf->Cell(0.7,0.7,$npwp, 'BR', 0, 'C');// substr($npwp, 0, 1),'LBR',0,'C');
//$this->fpdf->Cell(2.5,0.7,"",'R',0,'C');
//$this->fpdf->Cell(0.05,0.7,"",'TLBR',0,'C',1);

//$this->fpdf->Ln(0.7);
$size02 = 0;
$size1 = 1;
$size2 = 3;
$size3 = 1.5;
$size4 = 2;
$size5 = 1.5;
$size6 = 3;
$size7 = 1.5;
/*
	$this->fpdf->SetFont('Times','',9);
	$this->fpdf->Cell($size1,$size02,$tgl,0,0,'C'); //tgl
	$this->fpdf->Cell($size2,$size02,number_format(($jumlah), 0, '', '.'),0,0,'C'); //pokok
	$this->fpdf->Cell($size3,$size02,number_format(($jumlah), 0, '', '.'),0,0,'C');
	$this->fpdf->Cell($size4,$size02,$sandi,0,0,'C');
	$this->fpdf->Cell($size5,$size02,number_format(($jumlah), 0, '', '.'),0,0,'C');
	$this->fpdf->Cell($size6,$size02,'11',0,0,'C');
	$this->fpdf->Cell($size7,$size02,number_format(($saldo), 0, '', '.'),0,0,'C'); //jumlah
*/
if($sandi=='74'){
	$this->fpdf->SetFont('Times','',9);
	$this->fpdf->Cell($size1,$size02,$tgl,0,0,'C'); //tgl
	$this->fpdf->Cell($size2,$size02,number_format(($jumlah), 0, '', '.'),0,0,'C'); //pokok
	$this->fpdf->Cell($size3,$size02,'',0,0,'C');
	$this->fpdf->Cell($size4,$size02,$sandi,0,0,'C');
	$this->fpdf->Cell($size5,$size02,'',0,0,'C');
	$this->fpdf->Cell($size6,$size02,'',0,0,'C');
	$this->fpdf->Cell($size7,$size02,number_format(($saldo), 0, '', '.'),0,0,'C'); //jumlah
}else if($sandi=='82'){
	$this->fpdf->SetFont('Times','',9);
	$this->fpdf->Cell($size1,$size02,$tgl,0,0,'C'); //tgl
	$this->fpdf->Cell($size2,$size02,'',0,0,'C'); //pokok
	$this->fpdf->Cell($size3,$size02,number_format(($jumlah), 0, '', '.'),0,0,'C');
	$this->fpdf->Cell($size4,$size02,$sandi,0,0,'C');
	$this->fpdf->Cell($size5,$size02,'',0,0,'C');
	$this->fpdf->Cell($size6,$size02,'',0,0,'C');
	$this->fpdf->Cell($size7,$size02,number_format(($saldo), 0, '', '.'),0,0,'C'); //jumlah
}else{
	$this->fpdf->SetFont('Times','',9);
	$this->fpdf->Cell($size1,$size02,$tgl,0,0,'C'); //tgl
	$this->fpdf->Cell($size2,$size02,'',0,0,'C'); //pokok
	$this->fpdf->Cell($size3,$size02,'',0,0,'C');
	$this->fpdf->Cell($size4,$size02,$sandi,0,0,'C');
	$this->fpdf->Cell($size5,$size02,number_format(($jumlah), 0, '', '.'),0,0,'C');
	$this->fpdf->Cell($size6,$size02,'',0,0,'C');
	$this->fpdf->Cell($size7,$size02,number_format(($saldo), 0, '', '.'),0,0,'C'); //jumlah
}
$this->fpdf->Output("Surat_Setoran_Pajak.pdf","I");
?>
